package com.authine.cloudpivot.ext.enums.trade;

/**
 * @author yuanjiang
 * @date 2019/12/19
 */
public enum TradeDirection {
    /**
     * 交易方向
     */
    Sale("销售"),
    Purchase("采购");
    public String des;

    TradeDirection(String des) {
        this.des = des;
    }

    /**
     * 对应相反的枚举类型
     */
    public static TradeDirection getReverse(TradeDirection direction) {
        switch (direction) {
            case Sale:
                return Purchase;
            case Purchase:
                return Sale;
            default:
                return null;
        }
    }
}
